package org.oneblog.data.query;

import java.io.Serializable;

public class BaseSolrQuery implements Serializable {

    private static final long serialVersionUID = 7757398121475926139L;

    private Integer pageNo = 1;
    
    private Integer pageSize = 15;

    private String hilightTag = "span";
    
    public BaseSolrQuery() {
        
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public int getFirst() {
        return pageNo > 0 ? (pageNo - 1) * getMax() : 0;
    }
    public int getMax() {
        return pageSize > 0 && pageSize < 1000 ? pageSize : 20;
    }

    public String getHilightTag() {
        return hilightTag;
    }

    public void setHilightTag(String hilightTag) {
        this.hilightTag = hilightTag;
    }
}
